package com.jason.basicandroid.contentprovider;

import android.net.Uri;
import android.provider.BaseColumns;

public class BookProviderMetaData
{
   public static final String AUTHORITY = "com.jason.basicandroid.contentprovider.BookProvider";
   public static final String DATABASE_NAME = "book.db";
   public static final int DATABASE_VERSION = 1;
   public static final String BOOKS_TABLE_NAME = "books";
   
   private BookProviderMetaData() {}
   
   //inner class describing BookTable
   public static final class BookTableMetaData implements BaseColumns
   {
      private BookTableMetaData() {}
      public static final String TABLE_NAME = "books";
      
      //uri and MIME type definitions
      public static final Uri CONTENT_URI =
      Uri.parse("content://" + AUTHORITY + "/books");
      
      public static final Uri CONTENT_ITEM_URI =
          Uri.parse("content://" + AUTHORITY + "/books/#");
      
      public static final String CONTENT_TYPE =
      "vnd.android.cursor.dir/vnd.androidbook.book";
      
      public static final String CONTENT_ITEM_TYPE =
      "vnd.android.cursor.item/vnd.androidbook.book";
      
      public static final String DEFAULT_SORT_ORDER = "created DESC";
      
      //Additional Columns start here.
      //long type
      public static final String BOOK_ID = "id";
      
      //string type
      public static final String BOOK_NAME = "name";
      
      //string type
      public static final String BOOK_ISBN = "isbn";
      
      //string type
      public static final String BOOK_AUTHOR = "author";
      
      //Integer from System.currentTimeMillis()
      public static final String CREATED_DATE = "created";
      
      //Integer from System.currentTimeMillis()
      public static final String MODIFIED_DATE = "modified";
   }
}
